package com.uchiha.nova.core.model.enums;

/**
 * @Author 周林静
 * @Date 2022-09-24,0024 18:05
 * @Version 1.0
 */
public enum IotAssetTypeEnum {

    IotAssetTypeEnum0("common","普通空间"),
    IotAssetTypeEnum1("dorm","宿舍"),
    IotAssetTypeEnum2("meetingRom","会议室"),
    IotAssetTypeEnum3("officeStation","工位"),
    IotAssetTypeEnum4("parking","停车场"),
    IotAssetTypeEnum5("computerRoom","计算机机房"),
    IotAssetTypeEnum6("publicArea","公共空间");
    String value;
    String label;
    IotAssetTypeEnum(String value, String label){
        this.value = value;
        this.label = label;
    }
    public static String getStateLabel(String value){
        for (IotAssetTypeEnum n : IotAssetTypeEnum.values()) {
            if (n.getValue().equals(value)) {
                return n.label;
            }
        }
        return "";
    }

    public static String getStateValue(String label){
        for (IotAssetTypeEnum n : IotAssetTypeEnum.values()) {
            if (n.getLabel().equals(label)) {
                return n.value;
            }
        }
        return "";
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }
}
